<?php
$group_id=$_GET['group_id'];
$query = "DELETE FROM tbl_page WHERE page_status=0";
Db::mysql_query ( $query, FETCH_MODE_NONE );
$query = "INSERT INTO tbl_page(page_group_id,page_status,page_create_time) VALUES ('$group_id',0,".time().")";
Db::mysql_query ( $query, FETCH_MODE_NONE );
$id=mysql_insert_id();
if($group_id==3)
	Common::header_location(null,"popup.php?page=_update-news&id=$id&group_id=$group_id");
else if($group_id==4)
	Common::header_location(null,"popup.php?page=_update-class&id=$id&group_id=$group_id");
else
	Common::header_location(null,"popup.php?page=_update-by-id&id=$id&group_id=$group_id");
?>